Function Reference

Eval

Return the value of the variable defined by an string.

Eval ( string )

 

Parameters

string string representing name of the variable.

 

Return Value

Success: Returns the value of the variable.
Failure: Returns "" (blank string) with @error set not to 0.

 

Remarks

If there is a need to use Eval() to to read a variable, the in most situations Assign() should be used to create/write to the variable and IsDeclared() should be used to check that the variable exists.

 

Related

IsDeclared, Assign, Execute

 

Example


Dim $a_b = 12
$s = Eval("a" & "_" & "b")  ; $s is set to 12

$s =Eval("c")  ; $s = "" and @error = 1